#ifndef HD44780PARALLEL_ANALYZER_RESULTS
#define HD44780PARALLEL_ANALYZER_RESULTS

#include <AnalyzerResults.h>
#include <vector>

class HD44780Analyzer;
class HD44780AnalyzerSettings;
class ResultAnalyzer;
class ReportGenerator;

class HD44780AnalyzerResults : public AnalyzerResults
{
public:
	HD44780AnalyzerResults( HD44780Analyzer* analyzer, HD44780AnalyzerSettings* settings );
	virtual ~HD44780AnalyzerResults();
	virtual void GenerateBubbleText( U64 frame_index, Channel& channel, DisplayBase display_base );
	virtual void GenerateExportFile( const char* file, DisplayBase display_base, U32 export_type_user_id );
	virtual void GenerateFrameTabularText(U64 frame_index, DisplayBase display_base );
	virtual void GeneratePacketTabularText( U64 packet_id, DisplayBase display_base );
	virtual void GenerateTransactionTabularText( U64 transaction_id, DisplayBase display_base );
    ResultAnalyzer* GetAnalyzer( U8 Index );
    U32 GetSampleRate();
    U64 GetTriggerSample();
    bool UpdateExportProgressAndCheckForCancel2( U64 completed_frames, U64 total_frames ) { return UpdateExportProgressAndCheckForCancel( completed_frames, total_frames); }
protected:  //vars
	HD44780AnalyzerSettings*        mSettings;
	HD44780Analyzer*                mAnalyzer;
    std::vector<ResultAnalyzer*>    mAnalyzerList;
    std::vector<ReportGenerator*>   mReportGeneratorList;
private:
    inline bool IsLastFrameInPacket(U64 frame_index) { return frame_index % 2 == 1; }
    inline bool IsLastFrame(U64 frame_index ) { return GetNumFrames() < (frame_index + 1 ); }
    inline void CreateResultAnalyzers();
    inline void DeleteResultAnalyzers();
    inline void CreateReportGenerators();
    inline void DeleteReportGenerators();
};

#endif //HD44780PARALLEL_ANALYZER_RESULTS
